<?php
namespace Web\Controller;
use Think\Controller;
class BaseController extends Controller {

    /**
    * 发送短信验证码
    * @param user_phone      要发送的手机号码
    */
    public function sendMsgCode(){

        // $_POST['user_phone'] = '13811341066';

        $phonenums = $_POST['user_phone'];
        $code = createRandomCode(4);
        alidayucode($code, $phonenums); //发送短信
        $this->backToClient(1,'获取短信验证码成功',$code);
    }

}